package tothreedesignmodel.composite;

/**
 * @author lzhphantom
 * @description
 * @date 创建于 17:57 2020/8/1
 * @modified
 */
public interface Component {
    /**
     * add a Component
     *
     * @param c Component
     * @return void
     * @description
     * @author lzhphantom
     * @date 17:57 2020/8/1
     */
    void add(Component c);

    /**
     * remove a Component
     *
     * @param c Component
     * @return void
     * @description
     * @author lzhphantom
     * @date 17:59 2020/8/1
     */
    void remove(Component c);

    /**
     * get a child of this Component
     *
     * @param i index
     * @return Component
     * @description
     * @author lzhphantom
     * @date 17:59 2020/8/1
     */
    Component getChild(int i);

    /**
     * operation
     *
     * @return void
     * @description
     * @author lzhphantom
     * @date 17:59 2020/8/1
     */
    void operation();
}
